#ifndef ASTNODE_BOOLEAN_OPERATOR_H
#define ASTNODE_BOOLEAN_OPERATOR_H
#include "AstNodeExpression.h"

class AstNodeExpression;
class AstNodeBooleanOperator;
class AstNodeCompareExpression;

class AstNodeBooleanOperator : public AstNode
//class AstNodeBooleanOperator : public AstNodeExpression
{
  public:
    enum {
      _and, _or, _not, _nop
    };

    AstNodeBooleanOperator(AstNodeBooleanOperator * left, AstNodeBooleanOperator  * expr, char cmpOperator);
    AstNodeBooleanOperator(AstNodeCompareExpression * cmp);

    virtual void compile(class CompileVisitor *);
    virtual void dump(int level);

#if 0
    virtual int  compile(ClassFile * klass, MethodInfo * method); 
    int compileWithReloc(
        ClassFile * klass, MethodInfo * method,
        RelocTable & relocOnTrue,
        RelocTable & relocOnFalse);
#endif

    inline  char                       getOper() { return oper; }
    inline  AstNodeBooleanOperator *   getLeft() { return left; }
    inline  AstNodeBooleanOperator *   getRite() { return rite; }
    inline  AstNodeCompareExpression * getCmp() { return cmp; }

  private:
    AstNodeBooleanOperator * left;
    AstNodeBooleanOperator * rite;
    char                     oper;

    AstNodeCompareExpression * cmp;
};

#endif
